//
//  UIView+YNPageExtend.h
//  YNPageViewController
//
//  Created by ZYN on 2018/4/22.
//  Copyright © 2018年 yongneng. All rights reserved.
//

#import <UIKit/UIKit.h>

#define isIPHONE_X_After ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone && [[UIScreen mainScreen] bounds].size.height >= 812)
#define isIPAD ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
#define kNAVIGATIONBAR_HEIGHT 64.0
#define kNAVIGATIONBAR_HEIGHT_X 88
#define kNAVIGATIONBAR_HEIGHT_IPAD 64
#define kSTATUSBAR_HEIGHT 20
#define kSTATUSBAR_HEIGHT_X 44
#define kSTATUSBAR_HEIGHT_IPAD 20
#define kTABBAR_HEIGHT 49
#define kTABBAR_HEIGHT_X 83
#define kTABBAR_HEIGHT_IPAD 83
#define kYM_NAVIGATIONBAR_HEIGHT (isIPAD ? kNAVIGATIONBAR_HEIGHT_IPAD : (isIPHONE_X_After ? kNAVIGATIONBAR_HEIGHT_X : kNAVIGATIONBAR_HEIGHT))
#define kYM_STATUSBAR_HEIGHT (isIPAD ? kSTATUSBAR_HEIGHT_IPAD : (isIPHONE_X_After ? kSTATUSBAR_HEIGHT_X : kSTATUSBAR_HEIGHT))
#define kYM_TABBAR_HEIGHT (isIPAD ? kTABBAR_HEIGHT_IPAD : (isIPHONE_X_After ? kTABBAR_HEIGHT_X : kTABBAR_HEIGHT))
#define kYMBottomH (isIPAD ? 0.0f : (isIPHONE_X_After ? 34.0f : 0.0f))
#define kBottomJGH (isIPAD ? 0.0f : (isIPHONE_X_After ? 19.0f : 0.0f))

#define kLESS_THAN_iOS11 ([[UIDevice currentDevice].systemVersion floatValue] < 11.0 ? YES : NO)

@interface UIView (YNPageExtend)

@property (nonatomic, assign) CGFloat yn_x;

@property (nonatomic, assign) CGFloat yn_y;

@property (nonatomic, assign) CGFloat yn_width;

@property (nonatomic, assign) CGFloat yn_height;

@property (nonatomic, assign) CGFloat yn_bottom;

@end
